source	=$(wildcard *.cpp)
object	=$(patsubst %.cpp, %.o, $(source))
target	= pbjd
CFLAGS	= -I/root/rui-arm/rui/ -I /root/rui-arm/jsoncpp -I /root/rui-arm/zlib-1.2.3 -I /root/rui-arm/uuid/include -Wall -Winline -g
LDFLAGS	= /root/rui-arm/rui/librui.a /root/rui-arm/uuid/lib/libuuid.a /root/rui-arm/zlib-1.2.3/libz.a /root/rui-arm/jsoncpp/libjsoncpp.a -lrt -lpthread

all: $(object)
	arm-linux-g++ -static $(CFLAGS) $(object) -o $(target) $(LDFLAGS) $(LIBS)
	-rm core* -rvf

%.o: %.cpp
	arm-linux-g++ -c $< -o $@ $(CFLAGS)

.PHONY:clean
clean:
	-rm -rvf core* $(object) $(target)
